Skip to content

[3.13] gh-69134: Harden tkinter GUI tests that depend on a mapped widget (GH-152499)#152518

Merged
serhiy-storchaka merged 1 commit into
python:3.13from
serhiy-storchaka:backport-0fff6bd-3.13
Jun 28, 2026
Merged

[3.13] gh-69134: Harden tkinter GUI tests that depend on a mapped widget (GH-152499)#152518
serhiy-storchaka merged 1 commit into
python:3.13from
serhiy-storchaka:backport-0fff6bd-3.13

Conversation

@serhiy-storchaka

@serhiy-storchaka serhiy-storchaka commented Jun 28, 2026

Copy link
Copy Markdown
Member

Add wait_until_mapped() and AbstractTkTest.require_mapped() to test_tkinter.support and use them to guard the assertions that need a widget to be actually mapped (winfo_width(), identify(), coords(), ...). This avoids intermittent failures under window managers that do not map the widget promptly, without skipping the unrelated checks.

(cherry picked from commit 0fff6bd)

…et (pythonGH-152499)

Add wait_until_mapped() and AbstractTkTest.require_mapped() to
test_tkinter.support and use them to guard the assertions that need a
widget to be actually mapped (winfo_width(), identify(), coords(), ...).
This avoids intermittent failures under window managers that do not map
the widget promptly, without skipping the unrelated checks.

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
(cherry picked from commit 0fff6bd)
@serhiy-storchaka serhiy-storchaka enabled auto-merge (squash) June 28, 2026 17:26
@serhiy-storchaka serhiy-storchaka changed the title [3.23] gh-69134: Harden tkinter GUI tests that depend on a mapped widget (GH-152499) [3.13] gh-69134: Harden tkinter GUI tests that depend on a mapped widget (GH-152499) Jun 28, 2026
@serhiy-storchaka serhiy-storchaka merged commit 7c6d529 into python:3.13 Jun 28, 2026
41 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant